import React from 'react'
import './SideMenu.css'
import { sideMenuList } from '../mockdata/1.js'
import { Menu } from 'antd'
import { DingtalkOutlined,CaretRightOutlined  } from '@ant-design/icons'

class SideMenu extends React.Component {
    constructor(props) {
        super(props)
        this.state = {
            bbb: 1
        }
    }

    render() {
        return (
            <Menu mode='vertical' className='side-menu'>
                {
                    sideMenuList.map((m, index) => (
                        <Menu.SubMenu
                            key={Math.random()}
                            title={
                                <span>
                                    <DingtalkOutlined></DingtalkOutlined>
                                    <span className='text1'>
                                    {m.title}
                                    </span>
                                   
                                </span>
                            }
                        >

                            {m.subMenu.map((sm, smindex) => (
                                <Menu.SubMenu
                                    key={Math.random()}
                                    title={
                                        <span>
                                            <CaretRightOutlined></CaretRightOutlined>
                                            {sm.title}
                                        </span>
                                    }
                                >


                                    {sm.subMenu.map((sms, smsindex) => (
                                        <Menu.Item
                                            key={Math.random()}

                                        >
                                            <span>
                                                <CaretRightOutlined></CaretRightOutlined>
                                                {sms}
                                            </span>
                                        </Menu.Item>
                                    ))}

                                </Menu.SubMenu>
                            ))}



                        </Menu.SubMenu>
                    ))
                }
            </Menu>
        )
    }
}

export default SideMenu